﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RoadTeam.BLL;
using System.Data;
using RoadTeam.Standard;

public partial class 对接测试页面_PC_PcDict : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        TextBox1.Text = "RmBuildingKind";
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        DictBLL bll = new DictBLL();

        GridView1.DataSource = bll.GetDictNotSync(TextBox1.Text);
        GridView1.DataBind();

        DataTable dt = bll.GetDictNotSync(TextBox1.Text);
        Dict dict;
        
        List<Dict> li=new List<Dict> ();
        foreach (DataRow dr in dt.Rows)
        {
            dict = new Dict();
            dict.DictIdentifier = dr[0].ToString();
            dict.DictCode = dr[1].ToString();
            dict.DictName = dr[2].ToString();
            li.Add(dict);
        }
        PcDict pcdict = new PcDict();
        pcdict.Item = li.ToArray();

    }

    protected void Button2_Click(object sender, EventArgs e)
    {
        DictBLL bll = new DictBLL();
      GridView1.DataSource=  bll.GetDictSync(TextBox1.Text);
      GridView1.DataBind();
    }
}